from flask import Blueprint
from flask_restful import Api
from comment.utils.output import output_json

# 初始化消息模块的蓝图
letter_bp = Blueprint('letter', __name__, url_prefix='/notify')
letter_api = Api(letter_bp)

# 使用我们自定义json格式，替代装饰器的写法
letter_api.representation('application/json')(output_json)


# 加载当前模块的资源
from financial.resources.letter.letter_resource import *

letter_api.add_resource(Letter_Res, '/message', endpoint='message')